package me.ereach.streams;

import java.util.List;
import java.util.stream.Stream;

public class Main04FlatMapping {
    public static void main(String[] args) {
        var stream = Stream.of(List.of(1, 2, 3), List.of(4, 5, 6));

        // flatMap method
        stream
                .flatMap(list -> list.stream())
                .forEach(n -> System.out.println(n));
    }
}
